import request from '@/utils/request'

//banner管理
/**
 * 获取菜单树形
 * @param {page,limit,type} data 
 * @returns 
 */

export function getBannerList(data) {
    return request({
        url: '/admin/banner/bannerList',
        method: 'post',
        data
    })
}

export function deleteBanner(data) {
    return request({
        url: '/admin/banner/delBanner',
        method: 'post',
        data
    })
}

export function addBanner(data) {
    return request({
        url: '/admin/banner/addBanner',
        method: 'post',
        data
    })
}

export function editBanner(data) {
    return request({
        url: '/admin/banner/editBanner',
        method: 'post',
        data
    })
}

/**
 * 上传图片
 * @param {file} data 
 * @returns 
 */
export function upload(data) {
    return request({
        url: '/admin/index/qiUpload',
        method: 'post',
        data
    })
}

// 登录日志
export function loginLog(data) {
    return request({
        url: '/admin/admin/logList',
        method: 'post',
        data
    })
}

// 操作记录
export function getOperateList(data) {
    return request({
        url: '/admin/operation/operationList',
        method: 'post',
        data
    })
}

/**
 * 操作分类
 * @param {} data 
 * @returns 
 */
export function classification(data) {
    return request({
        url: '/admin/operation/getType',
        method: 'post',
        data
    })
}

//富文本
/**
 * 获取富文本列表
 * @param {page,limit,keywords} data 
 * @returns 
 */
export function richtextList(data) {
    return request({
        url: '/admin/details/detailsList',
        method: 'post',
        data
    })
}

export function richtextInfo(data) {
    return request({
        url: '/admin/details/detailsView',
        method: 'post',
        data
    })
}

export function addRichtext(data) {
    return request({
        url: '/admin/details/addDetails',
        method: 'post',
        data
    })
}

export function editRichtext(data) {
    return request({
        url: '/admin/details/editDetails',
        method: 'post',
        data
    })
}

// 中奖赏级
/**
 * 获取中奖赏级列表
 * @param {page,limit,keywords,type} data 
 * @returns 
 */
export function rewardList(data) {
    return request({
        url: '/admin/rule/ruleList',
        method: 'post',
        data
    })
}

export function addReward(data) {
    return request({
        url: '/admin/rule/addRule',
        method: 'post',
        data
    })
}

export function editeReward(data) {
    return request({
        url: '/admin/rule/editRule',
        method: 'post',
        data
    })
}

// 储值规则
/**
 * 获取中奖赏级列表
 * @param {page,limit} data 
 * @returns 
 */
export function saveList(data) {
    return request({
        url: '/admin/money/moneyList',
        method: 'post',
        data
    })
}


export function delSave(data) {
    return request({
        url: '/admin/money/delMoney',
        method: 'post',
        data
    })
}

export function addSave(data) {
    return request({
        url: '/admin/money/addMoney',
        method: 'post',
        data
    })
}

export function editeSave(data) {
    return request({
        url: '/admin/money/editMoney',
        method: 'post',
        data
    })
}

// 商品库
/**
 * 获取中奖赏级列表
 * @param {page,limit,keywords} data 
 * @returns 
 */
export function productList(data) {
    return request({
        url: '/admin/goods/product/productList',
        method: 'post',
        data
    })
}

export function addProduct(data) {
    return request({
        url: '/admin/goods/product/addProduct',
        method: 'post',
        data
    })
}

export function editeProduct(data) {
    return request({
        url: '/admin/goods/product/editProduct',
        method: 'post',
        data
    })
}

export function delProduct(data) {
    return request({
        url: '/admin/goods/product/delProduct',
        method: 'post',
        data
    })
}

// 新手指导
/**
 * 获取中奖赏级列表
 * @param {page,limit} data 
 * @returns 
 */
export function noviceGuideList(data) {
    return request({
        url: '/admin/guidance/guidanceList',
        method: 'post',
        data
    })
}

export function deleteNoviceGuide(data) {
    return request({
        url: '/admin/guidance/delGuidance',
        method: 'post',
        data
    })
}

export function addNoviceGuide(data) {
    return request({
        url: '/admin/guidance/addGuidance',
        method: 'post',
        data
    })
}

export function editeNoviceGuide(data) {
    return request({
        url: '/admin/guidance/editGuidance',
        method: 'post',
        data
    })
}

// 今日推荐
/**
 * 获取今日推荐列表
 * @param {page,limit} data 
 * @returns 
 */
export function recommendationList(data) {
    return request({
        url: '/admin/box/tui/tuiList',
        method: 'post',
        data
    })
}

// 添加推荐列表
export function addRecommendationList(data) {
    return request({
        url: '/admin/box/tui/addTui',
        method: 'post',
        data
    })
}

// 删除推荐列表
export function delRecommendationList(data) {
    return request({
        url: '/admin/box/tui/delTui',
        method: 'post',
        data
    })
}

// 活动
/**
 * 获取活动列表
 * @param {page,limit} data 
 * @returns 
 */
export function acivityList(data) {
    return request({
        url: '/admin/active/activeList',
        method: 'post',
        data
    })
}

export function addAcivityList(data) {
    return request({
        url: '/admin/active/addActive',
        method: 'post',
        data
    })
}

export function editAcivityList(data) {
    return request({
        url: '/admin/active/editActive',
        method: 'post',
        data
    })
}


export function setSystemConfig(data) {
    return request({
        url: '/admin/config/setSystemConfig',
        method: 'post',
        data
    })
}
export function systemConfig(data) {
    return request({
        url: '/admin/config/systemConfig',
        method: 'post',
        data
    })
}
export function exportLs(query) {
    return request({
        url: '/admin/excel/exportLs',
        method: 'get',
        params: query
    })
}